

package cc.ArrayList;
    import static java.lang.System.out;
    public class Game{
        public static void main(String[] args){
            play(Action.RIGHT);
            play(Action.UP);
        }
        public static void play(int action){
            switch(action){
                case Action.STOP:
                    out.println("播放停止动画");
                    break;
                case Action.RIGHT:
                    out.println("播放向右动画");
                    break;
                case Action.LEFT:
                    out.println("播放向左动画");
                    break;
                case Action.UP:
                    out.println("播放向上动画");
                    break;
                case Action.DOWN:
                    out.println("播放向下动画");
                    break;
                default:
                    out.println("不支持此动作");
            }
        }
    }

